---
title: "Metrics"
description: "Get CPU and memory usage for sandboxes"
---

Endpoint: `GET /api/v1/sandboxes/metrics`

<ParamField query="namespace" type="string" default="default">Namespace</ParamField>

<RequestExample>
```bash cURL
curl -H "X-API-Key: $K7_API_KEY" "$BASE/api/v1/sandboxes/metrics?namespace=default"
```
</RequestExample>

Example response:

```json
{
  "data": [
    { "name": "my-sandbox", "namespace": "default", "cpu_usage": "10m", "memory_usage": "64Mi" }
  ]
}
```

### Units

- `cpu_usage` uses Kubernetes format (e.g., `10m` = 10 millicores).
- `memory_usage` uses Kubernetes format (e.g., `64Mi`).


